﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="BlogforAdmin.aspx.cs" Inherits="BlogforAdmin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;My Blog<span style="color: #3333CC"><strong><em><br />
        </em>
        <asp:Label ID="lblID" runat="server" ForeColor="#D8544F" Text="ID" 
            Font-Bold="False" Font-Size="Medium"></asp:Label>
        <br />
        </strong>
        <asp:Label ID="Label1" runat="server" ForeColor="#D8544F" Text="Topic: " 
            Font-Bold="False" Font-Size="Medium"></asp:Label>
        </span>
        <asp:TextBox ID="txtTopic" runat="server" Width="721px" Height="284px"></asp:TextBox>
        <br />
        <asp:Label ID="Label2" runat="server" Text="Image: " Font-Bold="False" 
            Font-Size="Medium"></asp:Label>
        <asp:FileUpload ID="flUpload" runat="server" />
        <br />
        <asp:Image ID="Image1" runat="server" Height="134px" Width="143px" 
            Visible="False" />
    </h1>
    <h1>
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnInsert" runat="server" onclick="btnInsert_Click" 
            Text="Add new" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnUpdate" runat="server" onclick="btnUpdate_Click" Text="Edit" 
            Width="74px" />
    </h1>
    <h1>
        &nbsp;</h1>
    <h1>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" DataKeyNames="ID" 
            onrowdeleting="GridView1_RowDeleting" Width="912px" Font-Size="Medium">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="ID" />
                <asp:BoundField DataField="Topic" HeaderText="Topic" />
                <asp:ImageField DataImageUrlField="photo" HeaderText="Image">
                </asp:ImageField>
                <asp:CommandField ShowSelectButton="True" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
    </h1>
    <p>
        &nbsp;</p>
    <p>
        <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/AdminPage.aspx">Back to Admin Page</asp:LinkButton>
    </p>
</asp:Content>

